#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#ifndef _ADC2REG_CLK_H_
#define _ADC2REG_CLK_H_

typedef struct _ADC2REG_CLK_CONFIG{

    int reg_num;
    uint32_t reg_cnt_max;

} ADC2REG_CLK_CONFIG;


int init_adc2reg_clk_config( ADC2REG_CLK_CONFIG *cfg );

int read_adc2reg_clk_config( ADC2REG_CLK_CONFIG *cfg, char *inifile, char *section );

int free_adc2reg_clk_config( ADC2REG_CLK_CONFIG *cfg );

int config_adc2reg_clk_via_SPI( uint32_t *gpio_reg,
                                uint32_t *gpio2_reg, 
                                ADC2REG_CLK_CONFIG *cfg );

#endif // _ADC2REG_CLK_H_